package es.xpt.ysf.commons.issues.model;

import es.xpt.ysf.utils.JNDIName;

public class Action { // NO_UCD
	
	public enum ActionType {  // NO_UCD
		WEB, SERVER }
	
	private ActionType type;
	
	private String name;
	
	private String dispatchPage;
	private String methodName;
	private JNDIName jndiName;
	
	public Action ( String name, String dispatchPage ) {
		this.type = ActionType.WEB;
		this.name = name;
		this.dispatchPage = dispatchPage;
	}
	
	public Action ( String name, JNDIName jndiName, String methodName ) {
		this.type = ActionType.SERVER;
		this.name = name;
		this.jndiName = jndiName;
		this.methodName = methodName;
	}
	
	
	public ActionType getType() {
		return type;
	}
	public void setType(ActionType type) {
		this.type = type;
	}
	public String getDispatchPage() {
		return dispatchPage;
	}
	public void setDispatchPage(String dispatchPage) {
		this.dispatchPage = dispatchPage;
	}
	public String getMethodName() {
		return methodName;
	}
	public void setMethodName(String methodName) {
		this.methodName = methodName;
	}
	public JNDIName getJndiName() {
		return jndiName;
	}
	public void setJndiName(JNDIName jndiName) {
		this.jndiName = jndiName;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}

}
